package
{
	
	import Account;
	
	public class Player extends Object
	{
		
		private var account:Account;
		public var arrItems:Array;
		public var arrAchievements:Array;
		public var intHP:int;
		public var intHPMax:int;
		public var strUsername:String;
		public var equippedGun:Item
		
		public function Player()
		{
			
			super();
			arrItems = [];
			arrAchievements = [];
			
		}
		
		public function init():void
		{
			
			account = new Account();
			account.refreshData();
			
				if (account.data == null)
				{
					
					arrItems = new Array();
					arrAchievements = new Array();
					
				} else {
					
					arrItems = account.data.myItems;
					arrAchievements = account.data.myAchievements;
					intHP = account.data.intHP;
					intHPMax = account.data.intHPMax;
					strUsername = account.data.strUsername;
					
				}
		}
	}
}